package com.dhcc.rabbitmq.fanoutexchange.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 
* <p>标题: Receiver.java</p>
* <p>业务描述:消费者</p>
* <p>公司:东华软件股份公司</p>
* <p>版权:dhcc2013</p>
* @author 胡凯
* @date 2019年7月29日
* @version V1.0
 */
@Component
public class Receiver {
	@RabbitListener(queues = "q_fanout_A")
	@RabbitHandler
	public void processA(String hello) {
		System.out.println("AReceiver  : " + hello + "/n");
	}

	@RabbitListener(queues = "q_fanout_B")
	@RabbitHandler
	public void processB(String hello) {
		System.out.println("BReceiver  : " + hello + "/n");
	}

	@RabbitListener(queues = "q_fanout_C")
	@RabbitHandler
	public void processC(String hello) {
		System.out.println("CReceiver  : " + hello + "/n");
	}
	
	@RabbitListener(queues = "q_fanout_D")
	@RabbitHandler
	public void processD(String hello) {
		System.out.println("DReceiver  : " + hello + "/n");
	}
}
